﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ParallelCubeProcessor
{
    enum ParallelProcessingType 
    {
        Threaded,
        XMLAParallel
    }
    class ParallelProcessingHandlerFactory
    {
        public static ParallelProcessingHandler GetParallelProcessingHandler(ParallelProcessingType Type, string ServerName)
        {
            return GetParallelProcessingHandler(Type, 2, ServerName);
        }
        public static ParallelProcessingHandler GetParallelProcessingHandler(ParallelProcessingType Type, int MaxConcurrent, string ServerName)
        {
            if (Type == ParallelProcessingType.XMLAParallel)
            {
                return new XMLAHandler(MaxConcurrent, ServerName);
            }
            else
            {
                return new ThreadHandler(MaxConcurrent, ServerName);
            }
        }
    }
}
